/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/9.
	 */
	var SeamlessScroll = __webpack_require__(24);
	var Root = React.createClass({displayName: "Root",
	    render:function(){
	        var config = {
	            speed: 20,  //滚动速度
	            type: 2,    //1：无缝滚动，2：间歇滚动:只有向上滚动的场景
	            stopTime: 3000  //间歇滚动停顿时间
	        }
	        return(
	            React.createElement(SeamlessScroll, {config: config}, 
	                React.createElement("ul", null, 
	                    React.createElement("li", null, "1分钟前某企业投资了1,000元 "), 
	                    React.createElement("li", null, "投资 6"), 
	                    React.createElement("li", null, "投资 7"), 
	                    React.createElement("li", null, "投资 8"), 
	                    React.createElement("li", null, "投资 9"), 
	                    React.createElement("li", null, "投资 10"), 
	                    React.createElement("li", null, "登录时为什么会提示账户被锁定"), 
	                    React.createElement("li", null, "如何查询我的投标情况？"), 
	                    React.createElement("li", null, "为什么我会支付不成功？"), 
	                    React.createElement("li", null, "怎么计算项目实际收益？")
	                )
	            )
	        )
	    }
	});
	ReactDOM.render(React.createElement(Root, null), document.getElementById('main'));

/***/ },

/***/ 24:
/***/ function(module, exports) {

	/**
	 * Created by Administrator on 2017/3/17.
	 */
	var SeamlessScroll = React.createClass({displayName: "SeamlessScroll",
	    getDefaultProps: function(){
	        return {
	            config: {
	                speed: 33,  //滚动速度
	                type: 1,    //1：无缝滚动，2：间歇滚动:只有向上滚动的场景
	                stopTime: 3000  //间歇滚动停顿时间
	            }
	        }
	    },
	    componentDidMount: function(){
	        this.marginTop = 0;
	        this.scrollHandler();
	        if (window.addEventListener) {
	            window.addEventListener('blur', this.onWindowBlur.bind(this));
	            window.addEventListener('focus', this.onWindowFocus.bind(this));
	        } else {
	            window.attachEvent('blur', this.onWindowBlur.bind(this));
	            window.attachEvent('focus', this.onWindowFocus.bind(this));
	        }
	    },
	    onWindowFocus: function(){
	        this.scrollHandler();
	    },
	    onWindowBlur: function(){
	        clearInterval(this.timer);
	    },
	    scrollHandler: function(){
	        var _this = this;
	        if(_this.props.config.type == 1){
	            _this.timer = setInterval(function(){
	                if(_this.marginTop == _this.refs['seamlessScroll'].childNodes[0].childNodes[0].offsetHeight){
	                    _this.marginTop = 0;
	                    _this.refs['seamlessScroll'].childNodes[0].appendChild(_this.refs['seamlessScroll'].childNodes[0].childNodes[0]);
	                }else{
	                    _this.marginTop += 1;
	                }
	                 _this.refs['seamlessScroll'].childNodes[0].style.marginTop = -_this.marginTop + "px";
	            },_this.props.config.speed);
	        }else if(_this.props.config.type == 2){
	            _this.timer = setInterval(function(){
	                var tm = setInterval(function(){
	                    if(_this.marginTop == _this.refs['seamlessScroll'].childNodes[0].childNodes[0].offsetHeight){
	                        _this.marginTop = 0;
	                        _this.refs['seamlessScroll'].childNodes[0].appendChild(_this.refs['seamlessScroll'].childNodes[0].childNodes[0]);
	                        clearInterval(tm);
	                    }else{
	                        _this.marginTop += 1;
	                    }
	                    _this.refs['seamlessScroll'].childNodes[0].style.marginTop = -_this.marginTop + "px";
	                },_this.props.config.speed);
	            },_this.props.config.stopTime);
	        }
	    },
	    mouseMoveHandler: function(){
	        clearInterval(this.timer);
	    },
	    mouseOutHandler: function(){
	        this.scrollHandler();
	    },
	    render:function(){
	        return (
	            React.createElement("div", {className: "ucs-seamless-scroll", ref: "seamlessScroll", onmousemove: this.mouseMoveHandler.bind(this), onmouseout: this.mouseOutHandler.bind(this)}, 
	                this.props.children
	            )
	        );
	    }
	});
	module.exports = SeamlessScroll;

/***/ }

/******/ });